package com.nmsl.nurse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nmsl.nurse.mapper.MHospitalizationRegistrationMapper;
import com.nmsl.nurse.domain.MHospitalizationRegistration;
import com.nmsl.nurse.service.IMHospitalizationRegistrationService;

/**
 * 住院登记Service业务层处理
 * 
 * @author mengdi
 * @date 2025-02-17
 */
@Service
public class MHospitalizationRegistrationServiceImpl implements IMHospitalizationRegistrationService
{
    @Autowired
    private MHospitalizationRegistrationMapper MHospitalizationRegistrationMapper;

    /**
     * 查询住院登记
     * 
     * @param registrationId 住院登记主键
     * @return 住院登记
     */
    @Override
    public MHospitalizationRegistration selectHospitalizationRegistrationByRegistrationId(Long registrationId)
    {
        return MHospitalizationRegistrationMapper.selectHospitalizationRegistrationByRegistrationId(registrationId);
    }

    /**
     * 查询住院登记列表
     * 
     * @param MHospitalizationRegistration 住院登记
     * @return 住院登记
     */
    @Override
    public List<MHospitalizationRegistration> selectHospitalizationRegistrationList(MHospitalizationRegistration MHospitalizationRegistration)
    {
        return MHospitalizationRegistrationMapper.selectHospitalizationRegistrationList(MHospitalizationRegistration);
    }

    /**
     * 新增住院登记
     * 
     * @param MHospitalizationRegistration 住院登记
     * @return 结果
     */
    @Override
    public int insertHospitalizationRegistration(MHospitalizationRegistration MHospitalizationRegistration)
    {
        return MHospitalizationRegistrationMapper.insertHospitalizationRegistration(MHospitalizationRegistration);
    }

    /**
     * 修改住院登记
     * 
     * @param MHospitalizationRegistration 住院登记
     * @return 结果
     */
    @Override
    public int updateHospitalizationRegistration(MHospitalizationRegistration MHospitalizationRegistration)
    {
        return MHospitalizationRegistrationMapper.updateHospitalizationRegistration(MHospitalizationRegistration);
    }

    /**
     * 批量删除住院登记
     * 
     * @param registrationIds 需要删除的住院登记主键
     * @return 结果
     */
    @Override
    public int deleteHospitalizationRegistrationByRegistrationIds(Long[] registrationIds)
    {
        return MHospitalizationRegistrationMapper.deleteHospitalizationRegistrationByRegistrationIds(registrationIds);
    }

    /**
     * 删除住院登记信息
     * 
     * @param registrationId 住院登记主键
     * @return 结果
     */
    @Override
    public int deleteHospitalizationRegistrationByRegistrationId(Long registrationId)
    {
        return MHospitalizationRegistrationMapper.deleteHospitalizationRegistrationByRegistrationId(registrationId);
    }
}
